﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <style>
        body {
         background-color:aqua;
        }
        #zhuce {
         margin-top:100px;
         text-align:center;
        }
        #father {
            background-color:white;
            border-style:solid;
            width:400px;
            height:auto;
            margin:auto;
            margin-top:5px;
        }
        
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <h1 id="zhuce">注册</h1>
            <div  id="father">
                 账号:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="账户名不能为空！" ControlToValidate="TextBox1" Display="Dynamic"></asp:RequiredFieldValidator>
            <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Overline="True" Font-Size="Larger" ForeColor="#CC0000"></asp:Label>
            <br />
            密码：<asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="密码不能为空！" ControlToValidate="TextBox2" Display="Dynamic"></asp:RequiredFieldValidator>
            <br />
            确认密码:<asp:TextBox ID="TextBox3" runat="server" TextMode="Password"></asp:TextBox> 
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="请再次输入密码！" ControlToValidate="TextBox3" Display="Dynamic"></asp:RequiredFieldValidator>
            <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="密码不一致！" ControlToCompare="TextBox2" ControlToValidate="TextBox3"></asp:CompareValidator>
            <br />
            出生日期：<asp:TextBox ID="TextBox4" runat="server" Height="23px"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="格式为: xxxx-xx-xx" ControlToValidate="TextBox4" Display="Dynamic" ValidationExpression="\d{4}-\d{2}-\d{2}"></asp:RegularExpressionValidator>
            <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="日期超出范围！" ControlToValidate="TextBox4" OnDataBinding="RangeValidator1_DataBinding" MinimumValue="1990-01-01" Type="Date"></asp:RangeValidator>
            <br />
            毕业日期：<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
            <asp:CompareValidator ID="CompareValidator2" runat="server" ErrorMessage="小于或等于出生日期" ControlToCompare="TextBox4" ControlToValidate="TextBox5" Display="Dynamic" Operator="GreaterThanEqual" Type="Date"></asp:CompareValidator>
            <br />
            电子邮箱：<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TextBox6" ErrorMessage="格式有误！" ValidationExpression="(\w+)(\.*)(\w+)@(\w+)(\.)(com|org|net|edu|mil|tv|biz|info)"></asp:RegularExpressionValidator>
            <br />
            头像:
            <asp:FileUpload ID="FileUpload1" runat="server" OnDataBinding="FileUpload1_DataBinding" />
            <asp:Literal ID="Literal1" runat="server"></asp:Literal>
            <br />
                 <asp:Image ID="Image1" runat="server" />
            <br />
            <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click" style="height: 27px" />
            <asp:Literal ID="Literal2" runat="server"></asp:Literal>
            <br />
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" BorderColor="#CC0000" BorderStyle="Solid" BorderWidth="2px" DisplayMode="List" ShowMessageBox="True" />
            </div>
           
        </div>

    </form>
</body>
</html>
